//---------------------------------------------------------------------------


#pragma hdrstop

#include "dataModule.h"
//#include "adminUnit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma classgroup "System.Classes.TPersistent"
#pragma resource "*.dfm"
TDataModule1 *DataModule1;
//---------------------------------------------------------------------------
__fastcall TDataModule1::TDataModule1(TComponent* Owner)
	: TDataModule(Owner)
{
}
//---------------------------------------------------------------------------

bool TDataModule1::connect(UnicodeString username, UnicodeString password)
{
	MySQL_Connection->Connected = false;
	MySQL_Connection->Params->Clear();
	MySQL_Connection->Params->Append("drivername=MySQL");
	MySQL_Connection->Params->Append("hostname=localhost");
	MySQL_Connection->Params->Append("Database=rating");
	MySQL_Connection->Params->Append("user_name="+username);
	MySQL_Connection->Params->Append("password="+password);
	MySQL_Connection->Params->Append("blobsize=-1");
	MySQL_Connection->Params->Append("localecode=0000");
	MySQL_Connection->Params->Append("compressed=False");
	MySQL_Connection->Params->Append("encrypted=False");
	MySQL_Connection->Params->Append("connecttimeout=60");
	MySQL_Connection->Connected = true;
	return true;
}


void __fastcall TDataModule1::prepodsClientDataSetAfterScroll(TDataSet *DataSet)
{
//	adminForm->update_prepod_edits();
}
//---------------------------------------------------------------------------


